<%-- 
    Document   : Employee
    Created on : May 9, 2012, 9:28:43 AM
    Author     : Nguyen Hung
--%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>
<html>
    <head>

        <script type="text/javascript" language="javascript" src="../scripts/jQuery/confirm.js"></script>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/jquery.fancybox-1.3.4.pack.js"></script>
        <!-- -->
        <link rel="stylesheet" type="text/css" href="../scripts/tabs/slidingtabs-horizontal.css">
        <script type="text/javascript" src="../scripts/tabs/slidetab.js"></script>
        <!-- -->
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/jquery.rateit.js"></script>
        <link rel="stylesheet" type="text/css" href="../css/rateit.css">

        <link rel="stylesheet" type="text/css" href="../scripts/table/jquery-ui-1.8.4.custom.css"/>
        <link rel="stylesheet" type="text/css" href="../scripts/table/tablesort.css"/>
        <script type="text/javascript" language="javascript">
            var open_cur = 0;
            $j = jQuery.noConflict(); 
            $j(document).ready(function(){  
                fk100 = $j('#fk350').val();
                fs200 = $j('#fs200').val();
                fv050 = $j('#fs200').val();
                //alert("showUploadDocumentTour.jsp?id="+fk100+"&fs200="+fs200+"&fv050="+fv050+"&table=V050");
                $j.post("showUploadDocumentTour.jsp?id="+fk100+"&fs200="+fs200+"&fv050="+fv050+"&table=V050",function(data){
                    if(data!=null) {
                        
                        $j(".documen_tour").html(data);
                                                       
                    }
                });  
                $j(".fs200").live("change",function(){
                    fs200 = $j(this).val();
                    fv050 = $j(this).val();
                    fk100 = $j(this).parents(".groupcomb").children(".comb1").children(".fk100").val();
                    //alert("showUploadDocumentTour.jsp?id="+fk100+"&fs200="+fs200+"&fv050="+fv050+"&table=V050");
                    $j.post("showUploadDocumentTour.jsp?id="+fk100+"&fs200="+fs200+"&fv050="+fv050+"&table=V050",function(data){
                        if(data!=null) {
                            window.location.href ="documentTour.jsp?action=linkrecord&fv050="+fv050;
                            //$j(".documen_tour").html(data);
                                                       
                        }
                    }); 
                });  
                $j(".fk100").live("change",function(){
                    fk100 = $j(this).val();
                    fs200 = $j(this).parents(".groupcomb").children(".comb2").children(".fs200").val();
                    fv050 = $j(this).parents(".groupcomb").children(".comb2").children(".fs200").val();
                    //alert("showUploadDocumentTour.jsp?id="+fk100+"&fs200="+fs200+"&fv050="+fv050+"&table=V050");
                    $j.post("showUploadDocumentTour.jsp?id="+fk100+"&fs200="+fs200+"&fv050="+fv050+"&table=V050",function(data){
                        if(data!=null) {
                            window.location.href ="documentTour.jsp?action=linkrecord&fv050="+fv050;
                            //$j(".documen_tour").html(data);
                                                       
                        }
                    }); 
                });  
                
                //              
                $j('.search_box').hide();       
                $j('.sidebar_search').live('click',function(){
                    $j('.search_box').hide();
                    if($j(this).next().hasClass('active')){
                        
                        $j('.search_box').removeClass('active');
                    }else{

                        $j('.search_box').removeClass('active');
                        $j(this).next().addClass('active');
                        $j(this).next().show();
                       
                    }
                });
                $j(".content_right").live("click",function(){
                    $j('.search_box').hide();
                });
              
           
                $j(".linkfs200").live("click",function(){
                 
                    fv050 =  $j(this).parents(".content_detail").find(".fs200").val();                    
                    window.location="managerTour.jsp?action=linkrecord&fv050="+fv050;
                });
                $j(".linkfs200T").live("click",function(){
                 
                    //fv050 =  $j(this).parents(".content_detail").find(".fs200").val();                    
                    window.location="listTour.jsp";
                });
         
            });
        </script>
        <style type="text/css"> 
            div.item_content_care,div.item_head_care
            {
                margin:0px;
                padding:5px;
                text-align:left;
                background:#D9DCDD;
                border:solid 1px #c3c3c3;


            }
            div.item_head_care{
                cursor: pointer;
                float:left;
                width:100%;
                margin-top:2px;
            }
            div.item_line{
                height: 3px;
                width: 100%;
            }
            div.item_content_care
            {
                height:120px;
                display:none;
                float:left;
                width:100%;
                background: #fff;
            }
            div.chare_content{
                float:left;

                height: auto;

            }
            .chare_content .chare_content_head{
                background:#586C7F; 
                float:left;
                height: 12px;
                padding:8px;
                width:897;

            }
            .chare_content .chare_content_head span{
                font-size: 12px;
                color:#fff;


                text-transform: uppercase;
            }
            div.item_content_care {
                background: none repeat scroll 0 0 #FFFFFF;
                display: none;
                float: left;
                height: auto;
                width: 100%;
            }
            .item_content_care_left{
                background: none repeat scroll 0 0 #E6E9EB;
                color: #0D67BC;
                cursor: pointer;
                float: left;
                margin-top: 5px;
                padding: 4px 4px 4px 9px;
                width: 127px;

            }
            .item_content_care_left:visited{
                color:#073763;
            }
            .item_content_care_right{

            }
            .item_content_care_detail{
                float: left;
                border:solid 1px #c3c3c3;
                width: 140px;
            }
            .item_content_care_detail_left{
                float:left;
                width:758px;

            }
            .groupcomb{
                margin-left: 283px;
                margin-top: -55px;
                position: absolute;
                width: 488px;
            }
            .comb1{
                float: left;
                margin-right:25px;

            }
            .comb1 select{
                width:150px;
                height: 25px;
            }
            .comb2 select{
                width:150px;
                height: 25px;
            }
            .comb2{
                float: left;

            }
            .documen_tour{

            }
            .addnew{
                background: url("../images/bg_button_bullet3.gif") no-repeat scroll 100% 0 transparent;
                border: 1px solid #4F6478;
                float: left;
                height: 43px;
                line-height: 43px;
                padding-right: 36px;
                text-align: left;
            }
            .add{
                background: url("../images/bg_button3.gif") repeat-x scroll 0 0 transparent;
                color: #FFFFFF;
                float: left;
                font-size: 14px;
                height: 43px;
                padding-left: 18px;
                text-shadow: 2px 2px 3px #333333;
                text-transform: uppercase;
                width: 200px;
            }

        </style>
    </head>


    <body>
        <input type="hidden" value="<h:outputText value='#{TourBean.fk350}'  />" id="fk350"/>
        <input type="hidden" value="<h:outputText value='#{TourBean.fv050}'  />" id="fs200"/>

        <f:loadBundle basename="#{environmentSession.localizationSource}" var="locale"/>
        <h:outputText value="<div class='permission' lang='#{loginSession.right.MNU_TKH_VIE}'></div>" escape="false"/>
        <div id="content">
            <div id="menu_top">
                <div class="dropdown">
                    <div class="select_choise">
                        <a href="#"><span>Khu vực</span></a>
                    </div>
                    <div class="select_hidden">
                        <ul>

                            <li><a href="#"><span>Filter Cấp 3</span></a></li>
                            <li><a href="#"><span>Filter Cấp 3</span></a></li>
                        </ul>
                    </div>
                </div>
                <div class="dropdown">
                    <div class="select_choise">
                        <a href="#"><span>Outlets</span></a>
                    </div>
                    <div class="select_hidden">
                        <ul>
                            <li><a href="#"><span>Ban Điều Hành</span></a></li>
                            <li><a href="#"><span>Nhóm IT</span></a></li>
                            <li><a href="#"><span>Filter Cấp 3</span></a></li>
                        </ul>
                    </div>
                </div>
            </div>
            <div id="content_detail" class="content_detail">
                <!-- start sidebar sidebar_row1--->
                <div class="sidebar_row1">
                    <div class="sidebar">
                        <%--   <h:commandLink styleClass="add_new" action="#{processBean.processAddEmployee}"><span><h:outputText value="#{locale.addEmployee}"/></span></h:commandLink> --%>

                        <%--<h:outputLink  rendered="#{loginSession.right.COM_LST_CRE}" value="inccuscompany.jsp?height=236px&width=405px" styleClass="fancybox add_new" id="fancybox">
                            <span> <h:outputText value="#{locale.addCustomer}"/></span>
                        </h:outputLink>--%>
                        <h:panelGroup rendered="#{loginSession.right.TKH_LST_CRE}">
                            <h:outputLink rendered="#{uploadController.tip==0}"  value="uploadfile.jsp?pn100=0&page=documentTour.jsp&fv050=#{TourBean.fv050}&fv051=#{TourBean.fv051}&type=ALL&table=V050&KeepThis=true&amp;TB_iframe=true&amp;height=350&amp;width=550&amp;modal=true" styleClass="thickbox addnew" id="thickbox2"  >
                            <span class="add"><h:outputText value="Thêm tài liệu"/></span>
                        </h:outputLink>
                        <h:outputLink rendered="#{uploadController.tip==1}"  value="uploadfile.jsp?pn100=0&page=documentTour.jsp&fv050=#{TourBean.fv050}&fv051=#{TourBean.fv051}&type=ALL&table=V030&KeepThis=true&amp;TB_iframe=true&amp;height=350&amp;width=550&amp;modal=true" styleClass="thickbox addnew" id="thickbox7"  >
                            <span class="add"><h:outputText value="Thêm tài liệu"/></span>
                        </h:outputLink>
                        </h:panelGroup>

                    </div>
                </div>
                <!-- end sidebar row1--->
                <!-- start sidebar row2--->
                <div class="sidebar_row2">
                    <h:panelGroup rendered="#{loginSession.right.TKH_LST_SER}">
                        <div class="sidebar">
                            <div class="sidebar_search">
                                <span> <h:outputText value="#{locale.search}"/></span>
                            </div>
                            <div class="search_box" style="display:none;">
                                <form action="" method="get">
                                    <h3><h:outputText value="#{locale.search}"/></h3>
                                    <div class="fields_input">
                                        <input name="" type="text"  value="<h:outputText value="#{locale.search_key}"/>..." onblur="if(this.value=='')this.value='<h:outputText value="#{locale.search_key}"/>...';" onfocus="if(this.value=='<h:outputText value="#{locale.search_key}"/>...')this.value='';" />
                                        <input name="" type="submit" value="OK" />
                                    </div>
                                </form>
                                <h4><h:outputText value="#{locale.advance_search}"/></h4>
                                <div class="fields_select">
                                    <select name="">
                                        <option><h:outputText value="#{locale.group}"/> / <h:outputText value="#{locale.Departments}"/></option>
                                    </select>
                                </div>
                                <div class="fields_select">
                                    <select name="">
                                        <option><h:outputText value="#{locale.sex}"/>...</option>
                                    </select>
                                </div>
                                <div class="fields_select">
                                    <select name="">
                                        <option><h:outputText value="#{locale.position}"/>...</option>
                                    </select>
                                </div>
                                <div class="fields_select">
                                    <select name="">
                                        <option><h:outputText value="#{locale.income}"/>...</option>
                                    </select>
                                </div>
                                <div class="fields_submit">
                                    <input name="" type="submit" value="<h:outputText value="#{locale.search_option}"/>" />
                                </div>
                            </div>
                        </div>
                    </h:panelGroup>
                </div>

                <!-- end sidebar row2--->
                <div class="fillter">
                    <%--
                    <div class="dropdown">
                        <h:panelGroup id="reload5">
                            <div class="select_choise ">

                                <div class="linkfs200"><a href="#"><span><h:outputText value="Chiết tính"/></span></a></div>


                            </div>

                        </h:panelGroup>
                    </div>
                    --%>
                </div>
                <div class="content_right">

                    <a4j:form id="demo">
                        <div class="content">

                            <!-- Strart list Content -->
                            <div class="list_content">

                                <div class="chare_content">
                                    <div class="groupcomb">
                                        <div class="comb1">
                                            <label><h:outputText value="#{locale.code_supplier}"/>:</label>
                                            <h:selectOneMenu value="#{TourBean.fk350}" styleClass="fk100" lang="#{TourBean.fk350}">
                                                <f:selectItem  itemLabel="#{locale.please_select}" itemValue="0"/>
                                                <f:selectItems  value="#{TourBean.listItemK100}"/>
                                            </h:selectOneMenu>

                                        </div>
                                        <div class="comb2">
                                            <label><h:outputText value="#{locale.code_tour}"/>:</label>
                                            <h:selectOneMenu   value="#{TourBean.fv050}" styleClass="fs200"  lang="#{TourBean.fv050}" >   
                                                <%--  <f:selectItem  itemLabel="#{locale.please_select}" itemValue="0"/> --%>
                                                <f:selectItems value="#{TourBean.listCombV050SGT}"/>   

                                            </h:selectOneMenu>
                                        </div>
                                    </div>
                                    <div class="chare_content_head"><span><h:outputText value="#{locale.list_doc_tour}" style="text-transform:uppercase"/></span>
                                        <h:panelGroup rendered="#{loginSession.right.TKH_LST_CHT && TourBean.status=='C'}"> <span style="float:right;color:#fff;margin-right:5px;">
                                                <div style="color:#fff;cursor: pointer;" class="linkfs200"><h:outputText value="#{locale.calculation}"/></div>
                                            </span></h:panelGroup>
                                        <h:panelGroup rendered="#{loginSession.right.TKH_LST_CHT && TourBean.status=='T'}"> <span style="float:right;color:#fff;margin-right:5px;">
                                                <div style="color:#fff;cursor: pointer;" class="linkfs200T"><h:outputText value="#{locale.listTour}"/></div>
                                            </span></h:panelGroup>
                                        </div>
                                        <div class="documen_tour"></div>
                                        <div class="item_line"></div>

                                    </div>
                                </div>
                                <!-- End List Content-->

                            </div>
                                    <h:inputHidden value="#{uploadController.tip}" id="tip"/>
                        <rich:modalPanel id="ajaxLoadingModalBox" minHeight="30" minWidth="40"
                                         height="30" width="40" zindex="2000">
                            <h:outputText value="#{locale.please_wait}" styleClass="startDummer"></h:outputText>
                        </rich:modalPanel>
                    </a4j:form>
                </div>
            </div>
        </div>

    </body>
</html>
